package cn.tedu.charging.device.mapper;

import cn.tedu.charging.common.pojo.po.ChargingGunInfoPO;
import cn.tedu.charging.common.pojo.vo.GunInfoVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface GunMapper extends BaseMapper<ChargingGunInfoPO> {
    @Select("select gun.* from charging_gun_info gun \n" +
            "left join charging_pile_info pile \n" +
            "on gun.pile_id=pile.id\n" +
            "where pile.station_id=#{stationId}")
    public List<ChargingGunInfoPO> getGunsByStationId(Integer stationId);
}
